export default {
	"username":{
		"rules":[
			{
				required: true,
				errorMessage: '请输入用户名',
			},
			{
				minLength: 3,
				maxLength: 32,
				errorMessage: '用户名长度在 {minLength} 到 {maxLength} 个字符',
			},
			{
				validateFunction:function(rule,value,data,callback){
					if (/^1\d{10}$/.test(value) || /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(value)) {
						callback('用户名不能是手机号或邮箱')
					}
					return true
				}
			}
		]
	},
	"password":{
		"rules":[
			{
				required: true,
				errorMessage: '请输入密码',
			},
			{
				minLength: 6,
				maxLength:20,
				errorMessage: '密码长度不少于 {minLength}个字符',
			},
		]
	},
	"pwd2":{
		"rules":[
			{
				required: true,
				errorMessage: '再次输入密码',
			},
			{
				validateFunction:function(rule,value,data,callback){
					if (value!=data.password) {
						callback('两次输入的密码不一致')
					}
					return true
				}
			}
		]
	}
}